#ifndef _platformapi_h_
#define _platformapi_h_
	#ifdef WIN32
			#include<WinSock2.h>

			#define socklen_t int
			#define MSG_NOSIGNAL 0
	#else
			#include<sys/types.h>
			#include<sys/socket.h>
			#include<sys/time.h>
			#include<sys/types.h>
			#include<sys/select.h>
			#include<netinet/in.h>
			#include<arpa/inet.h>
			#include<unistd.h>
			#include<fcntl.h>
			#include<errno.h>

			#define SOCKET int
			#define SOCKET_ERROR -1
			#define WSAEWOULDBLOCK EWOULDBLOCK
			#define WSAEAGAIN EAGAIN
			#define WSAEINPROGRESS EINPROGRESS
			#define GetLastError() (errno)
			#define SD_BOTH 2
			#define INVALID_SOCKET -1
	#endif             

class Platform
{
public:
	static void Create();
	static void Close(SOCKET s);
	static void SetNonBlock(SOCKET s);
};

#endif
